﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using _18miljard.Daily;

namespace _18miljard.UI.Forms
{
	public class BaseForm : Page
	{
		protected override PageStatePersister PageStatePersister
		{
			get
			{
				return new SessionPageStatePersister(this);
			}
		}

		protected override void OnLoad(EventArgs e)
		{
			this.DoDailyJobs();

			//no page is cached on the client!
			Response.Cache.SetNoStore();
			Response.Cache.SetCacheability(HttpCacheability.NoCache);

			base.OnLoad(e);
		}


		private void DoDailyJobs()
		{
			DailyJobs dailyJobs = DataCache.DailyJobs;

			dailyJobs.Handle();
		}

	}
}